﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace VIA.SiMoJi.Domain.SoftPLC
//{
//    public static class Hardwares
//    {
//        public static Dictionary<string, Cylinder1> Cylinders { get; } = new();
//        public static Dictionary<string, OutputSensor> Vacuums { get; } = new();

//        public static void Init()
//        {
//            #region 

//            AddCylinder("入料到位阻挡气缸1", 23, 24, 23, 24);
//            AddCylinder("入料到位阻挡气缸2", 23, 24, 25, 26);
//            AddCylinder("入料左右定位气缸1", 25, 26, 27, 28);
//            AddCylinder("入料左右定位气缸2", 25, 26, 29, 30);
//            AddCylinder("入料前后定位水平气缸1", 27, 28, 31, 32);
//            AddCylinder("入料前后定位水平气缸2", 27, 28, 33, 34);
//            AddCylinder("入料前后定位上下气缸1", 29, 30, 35, 36);
//            AddCylinder("入料前后定位上下气缸2", 29, 30, 37, 38);
//            //AddCylinder("取放料顶升气缸", 47, 48, 47, 48);
//            AddCylinder("飞达1压膜气缸", 49, 49, 49, 49);
//            AddCylinder("飞达1定位气缸", 50, 51, 50, 51);
//            AddCylinder("飞达2压膜气缸", 53, 53, 53, 53);
//            AddCylinder("飞达2定位气缸", 54, 55, 54, 55);
//            AddCylinder("NG下料无杆缸", 57, 58, 57, 58);
//            AddCylinder("NG下料抽屉定位气缸", 59, 60, 59, 60);
//            AddCylinder("夹爪1气缸1", 65, 66, 79, 80);
//            AddCylinder("夹爪2气缸1", 67, 68, 79, 80);
//            AddCylinder("夹爪3气缸1", 69, 70, 79, 80);
//            AddCylinder("夹爪4气缸1", 71, 72, 79, 80);
//            AddCylinder("夹爪5气缸1", 73, 74, 79, 80);
//            AddCylinder("夹爪6气缸1", 75, 76, 79, 80);
//            AddCylinder("夹爪7气缸1", 77, 78, 79, 80);
//            AddCylinder("夹爪1气缸2", 79, 80, 81, 80);
//            AddCylinder("夹爪2气缸2", 81, 82, 81, 82);
//            AddCylinder("夹爪3气缸2", 83, 84, 81, 82);
//            AddCylinder("夹爪4气缸2", 85, 86, 81, 82);
//            AddCylinder("夹爪5气缸2", 87, 88, 81, 82);
//            AddCylinder("夹爪6气缸2", 89, 90, 81, 82);
//            AddCylinder("夹爪7气缸2", 91, 92, 81, 82);

//            #endregion

//            #region 

//            #endregion
//        }

//        public static void AddCylinder(string name, int extensionSignal, int retractionSignal, int extensionSwitch, int retractionSwitch)
//        {
//            var cylinder = new Cylinder1(name, IOLable.Out_PiyshicalBitDataRegisters[extensionSignal], IOLable.Out_PiyshicalBitDataRegisters[retractionSignal], IOLable.In_PiyshicalBitDataRegisters[extensionSwitch], IOLable.In_PiyshicalBitDataRegisters[retractionSwitch]);
//            Cylinders[name] = cylinder;
//        }

//        public static void AddVacuum(string name, int output, int sensor)
//        {
//            var vacuums = new OutputSensor(name, IOLable.Out_PiyshicalBitDataRegisters[output], IOLable.Out_PiyshicalBitDataRegisters[sensor]);
//            Vacuums[name] = vacuums;
//        }
//    }
//}
